<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head><meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=0.5, maximum-scale=2.0, user-scalable=yes" /> 
<title>问卷</title>
<%@include file="/WEB-INF/jsp/common/style.jsp" %>
<link rel="stylesheet" type="text/css" href="${request.contextPath}/style/css.css"/>
<script type="text/javascript">
<!--

//提交答案
function submitAnswer(){	
	var val=null;	
	var flag=true;
	
	<c:forEach var="q" items="${questionLst}" varStatus="status">
	val=$('input:radio[name="question_${q.id}"]:checked').val();
    if(val==null){
        $("#qust_${q.id}").show();
        flag=false;
    }else{
    	$("#qust_${q.id}").hide();
    }    
    </c:forEach>
    
    if(!flag){
    	return;
    }     
    var kaptcha=$("#kaptcha").val();
    if(kaptcha==""){
    	$("#kaptchaInfo").html("请输入验证码！");
    	return;
    }    
    $.ajax({
    	  url: "${request.contextPath}/vote/codeInfo.action",
    	  cache: false,
    	  async: true,    	  
    	  data:{kaptcha:kaptcha,anticache:Math.floor(Math.random()*1000)},    	  
    	  dataType:"text",
    	  success: function(text){    		 
    	    if(text!="1"){
    	    	$("#kaptchaInfo").html("验证码不正确！");
	        	return false;
    	    }    	    	    
   	    	$("#qestForm").attr("target","_self");  
   	    	document.qestForm.action="${request.contextPath}/vote/answerQuestion.action";
   	    	document.qestForm.submit();    	    
    	  }
    });    
}
//重置
function resetAnswer(){
	<c:forEach var="q" items="${questionLst}" varStatus="status">	
	$('input:radio[name="question_${q.id}"]:checked').attr("checked",false);
	$("#qust_${q.id}").hide();
    </c:forEach>
    $("#kaptcha").val("");
    $("#kaptchaInfo").html("");
}
//换验证码
function updateImg(imgId) {  
	document.getElementById(imgId).src = "${request.contextPath}/kaptcha.jpg?" + Math.floor(Math.random() * 100);  
}  
function closeWin(){
	$("#light").hide();
	$("#fade").hide();
}
function inputPrize(){
	$("#qestForm").attr("target","_self");  
	document.qestForm.action="${request.contextPath}/vote/lotteryInfo.action";
	document.qestForm.submit();
}
//-->
</script>
</head>
<body>
<div class="wamp">
<div class="wamp1">
	<div class="top"><script type="text/javascript" src="http://www.whirlpool.com.cn/js/jquery-1.7.2.min.js" ></script>
<script type="text/javascript" src="http://www.whirlpool.com.cn/js/jquery.jcarousel.min.js"></script>
<script type="text/javascript" src="http://www.whirlpool.com.cn/js/jquery.cookie.js"></script>
<script type="text/javascript" src="http://www.whirlpool.com.cn/js/common.js" ></script>
<script type="text/javascript" src="http://www.whirlpool.com.cn/js/jquery.bannerSwitch.js" ></script>
<link type="text/css" href="http://www.whirlpool.com.cn/css/core.css" rel="stylesheet" /><link type="text/css" href="http://www.whirlpool.com.cn/css/home.css" rel="stylesheet" />
<!--[if IE 6]>
  <script src="/js/DD_belatedPNG_0.0.8a-min.js" type="text/javascript"></script>
  <script type="text/javascript">
  DD_belatedPNG.fix('.png');
  </script>
  <![endif]-->
 
   <style type="text/css">
   body{ background:#9f529a url(/images/bg.jpg) center top no-repeat; margin:0px; padding:0px;	}
       .mask-index{width:100%; height:100%; position:fixed; top:0; left:0; background:url(http://www.whirlpool.com.cn/images/mask-i.png) repeat; z-index:19999;}
        .newproducts{width:1002px; height:408px; position:absolute; top:140px; left:50%; margin-left:-501px; z-index:29999; display:block;}
        .newproducts img{width:100%; height:100%;}
.banner .bannerSwitch {
	width: 100%;
	height: 406px;
	margin: 0 auto;
	position: relative;
	overflow: hidden;
}
.banner .bannerSwitch img {
	
	
}
.banner .bannerSwitch li {
	position: absolute;
	left: 0;
	top: 0;width:100%; height:406px; overflow:hidden;
	z-index: 10;
	display: none;
	background-color: #fff;
}
.banner .bannerSwitch dl {
	position: absolute;width:555px; height:9px; background:#9F539D;
	bottom: 0px; padding:3px 0px 0px 445px; text-indent:-99999px;
	z-index: 11;
}
.banner .bannerSwitch dd {
	background: url("http://www.whirlpool.com.cn/images/index/i2.gif") repeat 0 0;
	width: 7px;
	height: 7px;
	line-height: 22px;
	text-align: center;
	font-size: 15px;
	font-weight: bold;
	overflow: hidden;
	float: left;
	margin-right: 15px;
	cursor: pointer;
	color: #fff;
}
.banner .bannerSwitch dd.current {
	background: url("http://www.whirlpool.com.cn/images/index/i1.gif") repeat 0 0;
}
.banner .bannerSwitch span {
	/*display: block;
	position: absolute;
	z-index: 12;
	top: 20px;
	height: 50px;
	width: 50px;
	border: 1px solid #fff;
	cursor: pointer;*/
}
.banner .bannerSwitch span.prev {
	left: 20px;
}
.banner .bannerSwitch span.next {
	right: 20px;
}
.kv {
	z-index: 1;
	width: 100%;
	height: 406px;
	overflow: hidden;
	position: relative;
}
.kv ul {
	height: 406px;
	overflow: hidden;
	position: relative;
}
.kv .img-loaded {
	display: none;
	height: 406px;
	overflow: hidden;
	position: relative;
}
.kv .txt {
	position:absolute; top:0px; width:1000px; overflow:hidden;
	height: 406px;
}
.kv .txt-inner {
	position: absolute;
	left: 0;
	bottom: 0;
	background: url(http://www.whirlpool.com.cn/images/common/bg2.png) repeat 0 0;
	border: 2px solid #8c5c92;
	padding: 10px;
	display: none;
	width: 976px;
	line-height: 20px;
}
.kv .txt-inner .fl {
	width: 600px;
	padding-bottom: 6px;
}
.kv .txt-inner .fr {
	width: 349px;
	padding-left: 25px;
}
.kv .txt-inner .fr img {
	margin: 0 10px;
}
.kv .num {
	position: relative;
	height: 12px;
	margin-top: -12px;
}
.kv .num-inner {
	background: #9f539d;
	height: 12px;
	overflow: hidden;
	position: absolute;
	left: 0;
	text-align: center;
}
.kv .num em {
	display: inline-block;
*display: inline;
	zoom: 1;
	height: 7px;
	line-height: 7px;
	width: 7px;
	background: url(http://www.whirlpool.com.cn/images/index/i2.gif) repeat 0 0;
	margin: 0 8px;
	vertical-align: top;
	overflow: hidden;
	margin-top: 2px;
	cursor: pointer;
}
.kv .num em.on {
	background: url(http://www.whirlpool.com.cn/images/index/i1.gif) repeat 0 0;
}
</style>
    <script type="text/javascript">
    <!--
        $(function() {
            $(".banner").bannerSwitch({
                time: 5000,
                animation: 1500
            });

            var dlPos = ($(window).width() - 1000) / 2;
            $(".banner .bannerSwitch li").css("width",$(window).width());
            $(".banner .bannerSwitch dl,.kv .txt").css("left", dlPos);

        });
    //-->
    </script>

</head>
<body>
 
 

<script type="text/javascript">
ACTrackerz = {
mid: 500198, //网站id
ers: [{type:"pageview"}],
track: function (er) {
this.ers.push(er);
}};
(function (){
		var js = document.createElement("script"), scri = document.getElementsByTagName("script")[0];
		js.type = "text/javascript";
		js.async = true;
		scri.parentNode.insertBefore(js, scri);
		js.src = location.protocol == "https:" ? "https://secure.acs86.com/nact.js" : "http://static.acs86.com/nact.js";
})();
</script>
<div class="top clearfix" style="position:absolute; z-index:10">
    <div class="top-con w tr" style="margin-left:-15px">
        <a href="http://www.whirlpool.com.cn/about/">关于惠而浦</a> | <a href="http://www.whirlpool.com.cn/news/">新闻中心</a> | <a href="http://www.whirlpool.com.cn/hr/" target="_blank">人才招聘</a> |    <a class="last" href="http://www.whirlpool.com.cn/user/login.aspx">登录/注册</a> 
    </div>
    <div class="inner png">
        <div class="w wrap" style=" margin-left:-20px;" >
            <div class="logo fl">
                <a href="http://www.whirlpool.com.cn/" title="惠而浦"><img src="http://www.whirlpool.com.cn/images/common/logo.png" alt="惠而浦" class="png" /></a>
            </div>

            <div class="menu fl">
                <ul>
                    <li class="png item li1 li1"><a href="http://www.whirlpool.com.cn/product/" class="a0 png">产品中心</a>
                         
                        
                    </li>
                    <li class="spc"></li>
                    <li class="png item li2 li2"><a href="http://www.whirlpool.com.cn/experience/" class="a0 png hasDrop">产品体验</a>
                    </li>
                    <li class="spc"></li>
                    <li class="png item li3 li3"><a href="http://www.whirlpool.com.cn/service/" class="a0 png hasDrop">售后服务</a>
                         
                    </li>
                    <li class="spc"></li>
                    <li class="png item li4 li4"><a href="http://www.whirlpool.com.cn/office/" class="a0 png">经销商专区</a> 
                    </li>
                    <li class="spc"></li>
                    <li class="png item li5 li5"><a href="http://www.whirlpool.com.cn/project/" class="a0 png">项目渠道</a>
                         
                    </li>
                     

                </ul>
            </div>

            <div class="search fr" >
                <form id="formhd" method="get" action="http://www.whirlpool.com.cn/product/list.aspx?" onSubmit="return hdSearch();">
                    <input placeholder="输入搜索关键字" name="keywords" id="keywords" class="txt1" /><input type="button" class="txt2" onClick="hdSearch()" />
                </form>
            </div>

            
        </div>
    </div>
</div>
<script type="text/javascript">
    function hdSearch() {
        if ($("#keywords").val() == "") {
            alert("关键词不能为空");return false;
        }
        location.href="http://www.whirlpool.com.cn/product/list.aspx?keywords=" + $("#keywords").val();
    }
</script>
</div>
<div class="ad" style="margin-top:-1px;"> 
	  <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="1000" height="250">
        <param name="movie" value="${request.contextPath}/images/ddd.swf">
		<param name="wmode" value="Opaque">
        <param name="quality" value="high">
        <embed src="/images/ddd.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="1000" height="250"></embed>
      </object>
	</div>
	<div class="wenticon">
		<form id="qestForm" name="qestForm" method="post">
		<input type="hidden" id="questionPart" name="questionPart" value="${questionPart }"/>
		<c:forEach var="q" items="${questionLst}" varStatus="status">
		<div class="wenti">
			<div class="wen">${status.index+1}.${q.title}</div>
			<div class="da">
		 
					<c:forEach var="d" items="${q.questionOpts}">
					<input type="radio" name="question_${q.id}" value="${d.id}"/><span>${d.code}.${d.content}</span>
					</c:forEach>
				 
			</div>
			<div id="qust_${q.id}" style="float:left; padding-left:15px; line-height:25px; font-size:12px; color:#FF0000;display:none;">此题为必答题，请选择相应选项！</div>
		</div>
		</c:forEach>				
		<c:if test="${message!=null && message!=''}">
		<div class="wenti">
			<div class="da">
				<ul>			
					<li  style="color:red;">${message}</li>
				</ul>
			</div>
		</div>
		</c:if>		
		<div class="yzm">		
		<table width="700" border="0" cellspacing="0" cellpadding="0">
  			<tr>
    			<td width="74" align="left" valign="middle">验证码：</td>
				<td width="140" align="left" valign="middle"><input id="kaptcha" name="kaptcha" type="text"  style="width:100px;height:25px"/></td>
			    <td width="112" align="left" valign="middle"><img id="imgId" src="${request.contextPath}/kaptcha.jpg" title="看不清，点击换一张" onclick="updateImg('imgId');" style="cursor: pointer;"/></td>
			    <td width="370" align="left" valign="middle"><a href="javascript:updateImg('imgId');" style="cursor: pointer;">看不清，点击换一张</a></td>
				<td width="4" valign="middle"><span id="kaptchaInfo" style="color:red"></span></td>	
				</tr>
		</table>
		</div>		
		<div class="tijiao">
			<div class="left-tj"><img src="${request.contextPath}/images/tijiao.jpg" onclick="submitAnswer();" style="cursor:pointer"/></div>
			<div class="right-tj"><img src="${request.contextPath}/images/chongzhi.jpg" onclick="resetAnswer();" style="cursor:pointer"/></div>
		</div>
		</form>							
 	</div>
</div>
</div>
<div class="foot" style="font-size:12px; text-align:center; line-height:40px;">©2014 Whirlpool .All Right Reserved 沪ICP备13004331号 惠而浦（中国）投资有限公司</div>		
<c:if test="${message==null || message==''}">
<%--没有抽过奖 --%>
<c:if test="${prizedInfo=='noprize'}">
<div id="light" class="white_content" style="display: block;">
	<div class="tishi">
		<div class="tishititle">
			<a href = "javascript:void(0)" onclick = "close();">
			<img border="0" src="${request.contextPath}/images/close.png" onclick="closeWin();">
			</a>
		</div>
		<div class="contishi">
			<div class="zhongjiang">
				<div class="left-zhongjiang"><img src="${request.contextPath}/images/gongxi.png"></div>
				<div class="right-zhongjiang">
					<h3 style="font-size:18px; font-family:SimSun; color:#333333; font-weight:bold; margin-top:25px;">感谢您参与本次调查活动!</h3>
					<h2 style="font-size:24px; font-weight:bold">恭喜您获得一次抽奖机会</h2>
				</div>
			</div>
			<div class="line"></div>
			<div class="weizi">转动大转盘有机会成为今天的大赢家</div>
			<div class="input" style="float:left;text-align:center;width:100%">
				<img src="${request.contextPath}/images/lijichoujiang.png" style="cursor:pointer" onclick="inputPrize();">
			</div>
		</div>
	</div>
</div>
<div id="fade" class="black_overlay" style="display:block;"></div>
</c:if>
<%--没有抽过奖 --%>
<c:if test="${prizedInfo=='prized'}">
<div id="light" class="white_content" style="display: block;">
	<div class="tishi">
		<div class="tishititle">
			<a href = "javascript:void(0)" onclick = "closeWin();">
			<img src="${request.contextPath}/images/close.png" border="0" />			</a>		</div>
		<div class="contishi">
			<div class="zhongjiang">
				<div class="left-zhongjiang"><img src="${request.contextPath}/images/gongxi.png" /></div>
				<div class="right-zhongjiang">
					<h4 style="font-size:16px; margin-top:20px; font-weight:bold;">感谢您参与本次调查活动!</h4>	
					
					<div style=" width:100%; margin-top:10px; margin-left:80px;  margin-bottom:25px;"><a href = "javascript:void(0)" onclick = "closeWin();"><img src="${request.contextPath}/images/queding.png" border="0" /></a></div>
				</div>
			</div>
			<div class="line"></div>
		</div>
	</div>
</div>
<div id="fade" class="black_overlay" style="display:block;"></div>
</c:if>
</c:if>
</body>
</html>